Certain embodiments of the present invention are directed to integrated circuits. More particularly, some embodiments of the invention provide a relaxation oscillator with reduced error or no error in output frequency caused by change in temperature and/or fabrication process. Merely by way of example, some embodiments of the invention have been applied to microcontrollers. But it would be recognized that the invention has a much broader range of applicability.
There are various types of conventional oscillators. For example, a conventional RC oscillator includes an odd number of stages of amplifiers. Usually the traditional RC oscillator generates a periodical clock signal by charging or discharging a capacitor, and the output frequency of the traditional RC oscillator depends on a RC time constant. Often the output frequency of the traditional RC oscillator is affected by changes in fabrication process (e.g., semiconductor process) and external temperature, and may contain a large error.
Hence it is highly desirable to improve the techniques of oscillators in order to improve precision of output frequency.